package com.liuyi.netty.im.lychat.modular.enums;

import cn.hutool.core.util.EnumUtil;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.liuyi.netty.im.commons.codes.CodeConst;
import com.liuyi.rapid.develop.tool.kit.EnumsKits;
import lombok.Getter;

/**
 * @author Mr.Fmy
 * @since 2021/12/30
 */
@Getter
public enum MessageFlow implements EnumsKits.IWEnum<Integer> {

    IN(0, "入"),
    OUT(1, "出");

    @EnumValue
    private final Integer v;
    private final String d;

    MessageFlow(Integer v, String d) {
        this.v = v;
        this.d = d;
    }

    public CodeConst.MsgFlow msgFlow() {
        return EnumUtil.fromString(CodeConst.MsgFlow.class, this.name());
    }
}
